Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

CSS Interview Questions and Answers

Question: If background and color should always be set together, why do they exist as separate properties?
Answer: There are several reasons for this. First, style sheets become more legible -- both for humans and machines. The background property is already the most complex property in CSS1 and combining it with color would make it even more complex. Second, color inherits, but background doesn't and this would be a source of confusion.
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook